package net.lab1024.sa.admin.module.business.yuqing.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import net.lab1024.sa.admin.module.business.yuqing.domain.entity.NewsArticleEntity;
import net.lab1024.sa.admin.module.business.yuqing.domain.form.NewsArticleQueryForm;
import net.lab1024.sa.admin.module.business.yuqing.domain.vo.NewsArticleVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 舆情文章 DAO
 *
 * @Author 1024创新实验室: 卓大
 * @Date 2025-01-15 10:00:00
 * @Wechat zhuda1024
 * @Email lab1024@163.com
 * @Copyright  <a href="https://1024lab.net">1024创新实验室</a>
 */
@Mapper
public interface NewsArticleDao extends BaseMapper<NewsArticleEntity> {

    /**
     * 分页查询舆情文章
     */
    List<NewsArticleVO> queryPage(Page page, @Param("query") NewsArticleQueryForm query);

    /**
     * 根据ID更新查看次数
     */
    void updateViewCount(@Param("articleId") Long articleId);

    /**
     * 批量删除文章
     */
    void batchDelete(@Param("articleIds") List<Long> articleIds);

    /**
     * 查询所有文章（导出用）
     */
    List<NewsArticleVO> queryAll(@Param("query") NewsArticleQueryForm query);
} 